﻿using Amazon.SimpleDB.Model;

namespace CsiroCloudAggregator.User.Object {
    public class AwsAuthenticationResponse {
        
        public bool Success;
        public AwsUserAccount UserAccount { get; set; }

        public static AwsAuthenticationResponse CreateFailResponse() {
            return new AwsAuthenticationResponse() {
                Success = false
            };
        }

        public static AwsAuthenticationResponse CreateSuccessResponse(AwsUserAccount account) {
            return new AwsAuthenticationResponse() {
                Success = true,
                UserAccount = account
            };
        }

        public static AwsAuthenticationResponse CreateSuccessfulResponse(Item item) {
            var response = new AwsAuthenticationResponse {
                UserAccount = AwsUserAccountHelper.CreateAwsUserAccount(item),
                Success = true
            };
            return response;
        }
    }
}
